Skip to content

fix(playground): ship a fresh Studio, hide what a playground leaves out - #27

Merged
Madraka merged 1 commit into
mainfrom
fix/playground-followups
Oct 20, 2026
Merged

Madraka merged 1 commit into
mainfrom
fix/playground-followups

Conversation

@Madraka

@Madraka Madraka commented Oct 20, 2026

Copy link
Copy Markdown
Contributor

Found while wiring cloudhal-dev/try to the published 0.3.0 (RFC-0036 step 3). Needs a 0.3.1 release before the playground works.

  • Release bug: scripts/build-packages.ts built Studio only when apps/studio/dist/index.html was missing, so @cloudhal/[email protected] shipped a Studio from 10:51 today, before phase 2: no playground mode, and a playground session lands on /login. The release now always builds Studio.
  • Studio on a playground: the site sidebar leaves out Analytics, Activity, Approvals and Automation (Agents, Schedules) and stops polling approvals; isNotEnabled treats 403 {error:"playground"} like a 404, so every gated screen reads it as "off" instead of retrying and showing errors; minutes left round down (it showed "61 minutes"). SiteShell's History and Automation groups moved into components (size ratchet).
  • FetcherBlobStore with keys never fetches another key. A static-assets binding with SPA fallback answers 200 + index.html for any missing file, which a layered blob store would have read as a node blob. (The try repo also serves assets without SPA fallback.)
  • Changeset: cli + storage patch (fixed group → 0.3.1). DESIGN.md §2af updated.

Verified against wrangler dev of the try repo with a fresh Studio: session bar, site overview, articles, edit → publish → render, Reset, kill switch.

pnpm check green locally (run alone, 18/18).

🤖 Generated with Claude Code

0.3.0's CLI shipped an apps/studio/dist built before Studio's playground
mode (build-packages only built Studio when no dist existed), so a
playground opened at the sign-in page. The release now always builds it.

On a playground, Studio's site sidebar leaves out Analytics, Activity,
Approvals and the Automation group and stops polling approvals, and a
403 playground answer reads as a feature that is off (isNotEnabled).
The minutes-left count rounds down. FetcherBlobStore with keys never
fetches another key: with SPA fallback, a static-assets binding answers
200 with index.html for any missing file.

Found while wiring cloudhal-dev/try to the published 0.3.0.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Signed-off-by: Madraka <[email protected]>
Copilot AI balanced review requested due to automatic review settings October 20, 2026 17:06

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.

An organization owner can choose the repository organization as the billing source for reviews requested by members with a paid Copilot license. Learn about Copilot code review billing.

Madraka added a commit to cloudhal-dev/try that referenced this pull request Oct 20, 2026
The Worker is now @cloudhal/cloudflare/playground: one SQLite-backed
Durable Object per visitor with the store, the API in playground mode and
the blog theme (the @cloudhal/cli starter) rendered under /s/<session>/.
This repo is an Astro project whose Worker entry is
src/playground/worker.ts; Studio is copied from @cloudhal/cli at build.

- Demo pack: the starter site plus three images, eight posts, three
  categories and a header menu, published. The images live under
  public/demo/ with the content keys of the fixed demo site id, so no
  session stores a copy.
- Landing page rendered by the Worker; only PLAYGROUND_ENABLED="true"
  opens the playground (wrangler.jsonc ships "false").
- Static files without SPA fallback (the demo blob layer must see real
  404s); the Worker serves Studio's index.html for its client routes.
- Bindings renamed to the package's: PLAYGROUND, SESSION_LIMIT,
  WRITE_LIMIT; PLAYGROUND_SECRET signs the session cookie.
- @cloudflare/vite-plugin pinned to 1.63.0 (the monorepo's; 1.64 needs
  wrangler 4.151). CI builds and runs wrangler deploy --dry-run.

Studio needs @cloudhal/cli 0.3.1: 0.3.0 shipped a Studio built before
its playground mode (cloudhal-dev/cloudhal#27).

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Signed-off-by: Madraka <[email protected]>
@Madraka
Madraka merged commit 5e90751 into main Oct 20, 2026
5 checks passed
@Madraka Madraka mentioned this pull request Oct 20, 2026
Madraka added a commit to cloudhal-dev/try that referenced this pull request Oct 20, 2026
0.3.1 ships a Studio built with its playground mode (0.3.0's predated it,
so a session landed on /login), hides what a playground leaves out from
the site sidebar and keeps FetcherBlobStore to its keys
(cloudhal-dev/cloudhal#27).

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Signed-off-by: Madraka <[email protected]>
Madraka added a commit that referenced this pull request Oct 20, 2026
fix(playground): ship a fresh Studio, hide what a playground leaves out
Madraka added a commit that referenced this pull request Oct 20, 2026
Ships a freshly built Studio (0.3.0's was stale, so playground sessions
landed on /login), hides features a playground leaves out, and keeps
FetcherBlobStore to its list (#27).

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Signed-off-by: Madraka <[email protected]>
@Madraka
Madraka deleted the fix/playground-followups branch October 20, 2026 21:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants